home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCMania 49
/
PCMania CD49_3.iso
/
INFOVIA
/
WIN31
/
TOUGH.SCR
< prev
next >
Wrap
Text File
|
1994-10-07
|
2KB
|
77 lines
<* Example SLANG script 11 Mar 94 language=slang
* This script is an example of a simple login session.
*
* Change "klingon" to a string the host you want to log into transmits
* when you make a connection.
*
* Change foo-slip to your slip userid.
*>
(define,host1,bogus_host)
(define,host2,klingon)
(define,number1,96590000)
(define,number2,96591000)
(define,login,{
(output,{Attempting connection to }(value,host(loopnum)){ at }(value,number(loopnum)){
})
(send,ATDT(value,number(loopnum))(cr))
(define,data,(receive,60000,login:))
(has,data,(value,host(loopnum)),{
(send,(output,{User Id? })(input)(cr))
(define,data,(receive,15000,Password:))
(has,data,password,{
(conecho,off)
(send,(output,{Connected to }(value,host(loopnum)){, password please? })(input)(cr))
})
},{
(output,(value,host(loopnum)){ connection failed.
}){Login Failed}
})
})
(define,try_to_login,{
(loop,{
(define,return,(login))
(has,return,Failed,
{(hangup)},
{(do_network_stuff_and_quit)}
)
},2)
{All Logins Failed}
})
(define,log_me_in,{
(loop,{
(define,return,(try_to_login))
(has,return,Failed,{
(output,{Login[s] failed. Want to try again [y/n] })
(==,(input),y,,{(break)})
})
},-1)
})
(define,hangup,{
(output{...Hanging up....
})
(define,discard,(receive,1000))
(send,+++)
(pause,1000)
(send,ath(cr))
(pause,1000)
(send,atz(cr))
(define,discard,(receive,1000))
})
(define,do_network_stuff_and_quit,{
(output{(shell,{c:\local\mpcmail -o -z})})
(start,c:\local\vmail,-o)
(output,(receive,2000))
(hangup)
(exit)
})
(log_me_in)
(exit)